import time
import logging
from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.webdriver import WebDriver
import logging
from wechat_add.base.base import BasePage


class AddMemberPage(BasePage):
     #_BTN_MANNUAL_IMPUT= (MobileBy.XPATH,'//*[@text="手动输入添加"]')
     #_BTN_GET_RESULT =(MobileBy.XPATH, '//*[@class="android.widget.Toast"]')

    logging.info("点击手动输入添加")
    def click_addmember_menual(self):
        from ding.wechat_add.page.editmember_page import EditMemberPage
        time.sleep(3)

        #//click 手动输入添加
        self.find_click(MobileBy.XPATH,'//*[@text="手动输入添加"]')


        return EditMemberPage(self.driver)
    logging.info("判断添加成功")
    def get_result(self):
        result = self.get_attribut(MobileBy.XPATH, '//*[@class="android.widget.Toast"]',"text")

        return result
        #assert result == "添加成功"